﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BakDatabase.aspx.cs" Inherits="Whir_System_Module_Config_BakDatabase" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Skin/Default/Css/main.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        if (top.location == self.location) { 
            alert('禁止访问子栏目页！将跳转到默认页面');
            top.location='../../Default.aspx';
        } 
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%"
            OnRowCommand="GridView1_RowCommand">
            <HeaderStyle CssClass="grid_Title" Height="20px" />
            <RowStyle CssClass="grid_td" Height="23px" />
            <Columns>
                <asp:TemplateField HeaderText="数据库备份">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("name") %>' Visible="false"></asp:Label>
                        <asp:LinkButton ID="LinkButton1" runat="server" Text='<%# Eval("name") %>' CommandName="Down"
                            CommandArgument='<%# Eval("name") %>' CausesValidation="false"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="大小">
                    <ItemTemplate>
                        <%# FileSystemObject.GetFriendlySize(long.Parse( Eval("size").ToString())) %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="备份时间" DataField="createTime" />
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbDeleteItem" runat="server" Text="删除" CausesValidation="false"
                            CommandName="DeleteItem" CommandArgument='<%# Eval("name") %>' OnClientClick="return confirm('确定删除此备份？一旦删除将不可恢复!');"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DADADA">
            <tr>
                <td height="26" colspan="2" align="left" class="form_title">增加数据备份 </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 120px">将数据库备份为: </td>
                <td class="form_td">
                    <asp:TextBox ID="TextBox1" runat="server" Width="230px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
                        ErrorMessage="输入备份文件的文件名,不包括扩展名(后缀名)，默认为 *.BAK"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 120px">说明: </td>
                <td class="form_td"><span class="form_desc">备份文件是数据库的复制品,将被保存在Temp\DBbak目录中。 </span>
                </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText" style="width: 120px"></td>
                <td class="form_td">
                    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="确定" CssClass="btn_default" />
                    <span style="color: #ff0000">提醒:最好将最新的数据库备份下载到本地。</span></td>
            </tr>
        </table>
    </form>
</body>
</html>

<script language="javascript" src="../../Js/common.js"></script>

<script type="text/javascript">initAutoFormStyle();</script>

